<?php require_once($_SERVER['DOCUMENT_ROOT']."/defaultconf.mex");
require_once($_SERVER['DOCUMENT_ROOT']."/Modules/MGK20XF5/moduleconf.php");
MYDCONN(); 
form_pr('DocView','','','post');?>
	<table  border="0" cellpadding="4" cellspacing="8">
        <tr bgcolor="#F8F8F8">
          <td bgcolor="#F2F2F2"><div align="center">
	        <img src="<?php echo $GLOBALS['GFX'];?>CentrodeCustos/invoice.png" border="0" alt="Documentos"></div></td>
          <td>Mostrar desde: <?php
		  mn_field('date','ED','Time',date("Y-m-01"),'DocView','8','','');
		  mn_field('button','ED','View','Ver','','','','" onclick="
			replaceUrl(\'app\',\'Modules/MGK20XF5/mdocs.php?Time=\'+document.DocView.Time.value);'); ?></td>
	    </tr>
	  </table>
  <table width="180"  border="0" cellpadding="3" cellspacing="7">
        <tr bgcolor="#ACB1CC">
          <td rowspan="20" bgcolor="#CED7DE">
		  <img src="<?php echo $GLOBALS['GFX'];?>CentrodeCustos/Docs.png" border="0" alt="Economato">
		 </td>
          <td>Documentação</td>
        </tr>
        <tr bgcolor="#F2F2F2">
          <td height="16"><a onclick="replaceUrl('app','Modules/MGK20XF5/bdocs.php');">Novo documento</a> </td>
        </tr>
        <tr bgcolor="#F2F2F2">
          <td height="16"><a onclick="replaceUrl('app','Modules/MGK20XF5/mdocs.php');">Documentos</a></td>
        </tr>
        <?php
    $Nav = $GLOBALS['MYD']->db_array("SELECT ref, name FROM hcdc_types WHERE Module = 27 ORDER BY name"); 
	for ($f = 1; $f <= $Nav[0]; $f++) {
      echo '<tr bgcolor="#F8F8F8">
          <td height="16"><a onclick="replaceUrl(\'app\',\'Modules/MGK20XF5/mdocs.php?DCTP='.$Nav[$f]['ref'].'\');">'.$Nav[$f]['name'].'</a></td>
        </tr>';
      } ?>
      </table>
</form>